package org.ghub.doc;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.apache.poi.hwpf.extractor.WordExtractor;

public class wordExtractor {
	
	private String url;
	private int page;
	private String allText;
	
	public wordExtractor() {
	}

	public wordExtractor(String url) {
		this.url = url;
	}
	
	public String generateText() throws IOException
	{		
		InputStream docStream = new FileInputStream(this.getUrl());
		WordExtractor extractor = new WordExtractor(docStream);
		return extractor.getText();
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public String getAllText() {
		return allText;
	}

	public void setAllText(String allText) {
		this.allText = allText;
	}		

}
